// 用户模块
import { SET_USER } from "./actionTypes";
export default {
  namespaced: true,
  state() {
    return {
      userInfo: {
        id: '',
        avatar: '',
        nickname: '',
        account: '',
        mobile: '',
        token: ''
      }
    }
  },
  mutations: {
    [SET_USER](state, userInfo) {
      state.userInfo = userInfo
    }
  },
  actions: {
    [SET_USER](context, userInfo) {
      context.commit(SET_USER, userInfo)
    }
  }
}